<?php

Route::group(array('prefix' => 'nd', 'before' => 'auth'), function() {

    # Domain Management
    Route::group(array('prefix' => 'master'), function()
    {
        Route::resource('domain', 'nimo\domains\master\controllers\DomainController');
        Route::get('domain/{domain}/up', array('as' => 'nd.master.domain.up', 'uses' => 'nimo\domains\master\controllers\DomainController@up'));
        Route::get('domain/{domain}/down', array('as' => 'nd.master.domain.down', 'uses' => 'nimo\domains\master\controllers\DomainController@down'));
        
        Route::resource('account', 'nimo\domains\master\controllers\AccountController');
        Route::get('account/{account}/up', array('as' => 'nd.master.account.up', 'uses' => 'nimo\domains\master\controllers\AccountController@up'));
        Route::get('account/{account}/down', array('as' => 'nd.master.account.down', 'uses' => 'nimo\domains\master\controllers\AccountController@down'));

        Route::resource('code', 'nimo\domains\master\controllers\CodeController');
    });
});
